<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='资源管理-新增',jsPaths='/static/js/system/resources/add.js')">


            <div class="right" th:fragment="right">
                <!--面包屑-->
                <div class="breadcrumb layui-bg-gray">
                    <span class="layui-breadcrumb" lay-separator=">">
                       <a href="/front/bk/index">首页</a>
                        <a href="">系統管理</a>
                        <a href="">資源管理</a>
                        <a><cite>新增</cite></a>
                    </span>
                </div>

                <!--主体内容区-->
                <div class="form-content layui-container">
                        <form class="layui-form" th:action="@{/resources/save}" method="post">
                            <div class="layui-form-item">
                                <label class="layui-form-label">资源名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="name"   lay-verify="required" placeholder="请输入资源名称" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">资源类型</label>
                                <div class="layui-input-block">
                                    <select name="type" lay-verify="required" lay-filter="type">
                                        <option value=""></option>
                                        <option value="1">模块</option>
                                        <option value="2">主页面</option>
                                        <option value="3">附属页面</option>
                                        <option value="9">操作</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item" id="url" style="display: none">
                                <label class="layui-form-label">访问URL</label>
                                <div class="layui-input-block">
                                    <input type="text" name="url"  lay-verify="required" placeholder="请输入URL" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">资源标识码</label>
                                <div class="layui-input-block">
                                    <input type="text" name="code"  lay-verify="required" placeholder="请输入资源标识码" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item" id="ssmk" style="display: none">
                                <label class="layui-form-label">所属模块</label>
                                <div class="layui-input-block">
                                    <select id="mokuai" name="parentModule" lay-filter="mokuai" lay-verify="required">

                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item" id="ssym" style="display: none">
                                <label class="layui-form-label">所属页面</label>
                                <div class="layui-input-block">
                                    <select id="yemian" name="parentPage" lay-filter="yemian">

                                    </select>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">排序权值</label>
                                <div class="layui-input-block">
                                    <input type="number" step="any" name="sortNo" value="1" placeholder="排序权值(越大越前)" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit lay-filter="formDemo">保存</button>
                                    <a th:href="@{/resources/ui/list}" class="layui-btn layui-btn-primary">返回</a>
                                </div>
                            </div>
                        </form>
                </div>
            </div>
</body>
</html>